/*
 Navicat Premium Data Transfer

 Source Server         : mine
 Source Server Type    : MySQL
 Source Server Version : 50623
 Source Host           : 115.28.68.18
 Source Database       : dev_vacation

 Target Server Type    : MySQL
 Target Server Version : 50623
 File Encoding         : utf-8

 Date: 12/29/2015 03:24:50 AM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `depart`
-- ----------------------------
DROP TABLE IF EXISTS `depart`;
CREATE TABLE `depart` (
  `depart_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `depart_name` varchar(255) DEFAULT NULL,
  `content` varchar(255) DEFAULT NULL,
  `master_user_id` int(11) DEFAULT NULL,
  `createtime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatetime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`depart_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `depart`
-- ----------------------------
BEGIN;
INSERT INTO `depart` VALUES ('1', '统计部门', '统计', '1', '2015-12-22 15:06:35', '2015-12-22 15:06:35'), ('2', '技术部', '技术', '2', '2015-12-28 00:41:05', '2015-12-28 00:41:05'), ('3', '测试部', '测试', '3', '2015-12-28 00:41:18', '2015-12-28 00:41:18');
COMMIT;

-- ----------------------------
--  Table structure for `leave_delay`
-- ----------------------------
DROP TABLE IF EXISTS `leave_delay`;
CREATE TABLE `leave_delay` (
  `leave_delay_id` int(11) NOT NULL AUTO_INCREMENT,
  `leave_id` int(11) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `imgurl1` varchar(255) DEFAULT NULL,
  `imgurl2` varchar(255) DEFAULT NULL,
  `imgurl3` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `decorator` varchar(255) DEFAULT NULL,
  `delay_endtime` timestamp NULL DEFAULT NULL,
  `delay_starttime` timestamp NULL DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `updatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`leave_delay_id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `leave_delay`
-- ----------------------------
BEGIN;
INSERT INTO `leave_delay` VALUES ('10', '24', '我要申请延期，我难产，还剖腹产', null, null, null, '1,2', null, '2016-01-17 00:00:00', '2016-01-07 00:00:00', 'SECOND_PASSED', '2015-12-27 05:05:43', '2015-12-27 05:05:43'), ('11', '24', '我要延期', null, 'GtZ1L4OsQJDSufP', null, '4', null, '2016-01-17 00:00:00', '2016-01-15 00:00:00', 'WAITING_FOR_FIRST_APPLY', '2015-12-29 03:13:11', '2015-12-29 03:13:11');
COMMIT;

-- ----------------------------
--  Table structure for `leave_info`
-- ----------------------------
DROP TABLE IF EXISTS `leave_info`;
CREATE TABLE `leave_info` (
  `leave_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `imgurl1` varchar(255) DEFAULT NULL,
  `imgurl2` varchar(255) DEFAULT NULL,
  `imgurl3` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `updatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`leave_id`)
) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
--  Records of `leave_info`
-- ----------------------------
BEGIN;
INSERT INTO `leave_info` VALUES ('23', '1', '我要年假', null, null, null, '1', 'SECOND_PASSED', '2015-12-28 15:12:42', '2015-12-26 22:47:17'), ('24', '1', '我要生产啦啦啦', null, null, null, '2', 'WAITING_FOR_DELAY_APPLY', '2015-12-27 05:10:50', '2015-12-27 04:25:18'), ('26', '1', '申请婚假', null, null, null, '3', 'WAITING_FOR_FIRST_APPLY', '2015-12-29 00:48:24', '2015-12-29 00:05:23'), ('29', '2', '回家相亲', 'LySKINjbaQCVICc', 'mSVcqIhUsLevywR', null, '1', 'WAITING_FOR_FIRST_APPLY', '2015-12-29 02:24:46', '2015-12-29 02:20:59'), ('27', '1', '我要事假', 'VuvG79m12e7CeKi', null, null, '4', 'FIRST_PASSED', '2015-12-29 00:48:32', '2015-12-29 00:20:43'), ('28', '1', '公司拍我外出', '89RHc7kcsBvbZdP', 'hNVSrzCzoX0msof', 'LySKINjbaQCVICc', '6', 'FIRST_PASSED', '2015-12-29 00:48:36', '2015-12-29 00:36:54'), ('30', '2', '我要去江南外出啦！！！', null, null, null, '6', 'WAITING_FOR_FIRST_APPLY', '2015-12-29 02:28:23', '2015-12-29 02:28:23');
COMMIT;

-- ----------------------------
--  Table structure for `leave_log`
-- ----------------------------
DROP TABLE IF EXISTS `leave_log`;
CREATE TABLE `leave_log` (
  `leave_log_id` int(11) NOT NULL AUTO_INCREMENT,
  `leave_id` int(11) DEFAULT NULL,
  `leave_delay_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `log` varchar(255) DEFAULT NULL,
  `note` varchar(255) DEFAULT NULL,
  `updatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`leave_log_id`)
) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `leave_log`
-- ----------------------------
BEGIN;
INSERT INTO `leave_log` VALUES ('14', '19', null, '1', '提交了申请', null, '2015-12-26 22:36:49', '2015-12-26 22:36:49'), ('15', '23', null, '1', '提交了申请', null, '2015-12-26 22:47:18', '2015-12-26 22:47:18'), ('16', '23', null, '4', '更新了申请的状态', null, '2015-12-27 03:17:59', '2015-12-27 03:17:59'), ('13', '3', '9', '1', '提交了延期申请', null, '2015-12-26 16:41:46', '2015-12-26 16:41:46'), ('17', '24', null, '1', '提交了申请', null, '2015-12-27 04:25:23', '2015-12-27 04:25:23'), ('18', '24', null, '4', '更新了申请的状态', null, '2015-12-27 04:27:22', '2015-12-27 04:27:22'), ('19', '24', null, '1', '更新了申请的状态', null, '2015-12-27 04:30:53', '2015-12-27 04:30:53'), ('20', '24', '10', '1', '提交了延期申请', null, '2015-12-27 13:25:10', '2015-12-27 05:05:47'), ('21', '24', '10', '4', '修改了延期申请状态', null, '2015-12-27 14:39:40', '2015-12-27 14:39:40'), ('22', '24', '10', '1', '修改了延期申请状态', null, '2015-12-27 15:04:44', '2015-12-27 15:04:44'), ('23', '29', null, '2', '提交了申请', null, '2015-12-29 02:21:29', '2015-12-29 02:21:29'), ('24', '30', null, '2', '提交了申请', null, '2015-12-29 02:28:25', '2015-12-29 02:28:25'), ('25', '28', null, '3', '更新了申请的状态', null, '2015-12-29 02:36:33', '2015-12-29 02:36:33'), ('26', '27', null, '4', '更新了申请的状态', null, '2015-12-29 02:56:07', '2015-12-29 02:56:07'), ('27', '24', '11', '1', '提交了延期申请', null, '2015-12-29 03:17:53', '2015-12-29 03:13:16');
COMMIT;

-- ----------------------------
--  Table structure for `leave_time`
-- ----------------------------
DROP TABLE IF EXISTS `leave_time`;
CREATE TABLE `leave_time` (
  `leave_time_id` int(11) NOT NULL AUTO_INCREMENT,
  `leave_id` int(11) DEFAULT NULL,
  `start_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `end_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`leave_time_id`)
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `leave_time`
-- ----------------------------
BEGIN;
INSERT INTO `leave_time` VALUES ('6', '23', '2015-12-26 00:00:00', '2016-01-01 00:00:00', '2015-12-26 22:47:17', '2015-12-26 22:47:17'), ('7', '24', '2016-01-01 00:00:00', '2016-02-01 00:00:00', '2015-12-27 04:25:19', '2015-12-27 04:25:19'), ('9', '26', '2016-01-15 00:00:00', '2016-01-19 00:00:00', '2015-12-29 00:05:23', '2015-12-29 00:05:23'), ('10', '27', '2015-12-28 00:00:00', '2016-01-17 00:00:00', '2015-12-29 00:20:43', '2015-12-29 00:20:43'), ('11', '28', '2016-01-29 10:00:00', '2016-01-31 14:00:00', '2015-12-29 00:36:54', '2015-12-29 00:36:54'), ('12', '29', '2015-12-31 00:00:00', '2016-01-03 00:00:00', '2015-12-29 02:20:59', '2015-12-29 02:20:59'), ('13', '30', '2016-01-29 00:00:00', '2016-02-04 00:00:00', '2015-12-29 02:28:23', '2015-12-29 02:28:23'), ('14', '30', '2016-02-20 00:00:00', '2016-02-28 00:00:00', '2015-12-29 02:28:23', '2015-12-29 02:28:23');
COMMIT;

-- ----------------------------
--  Table structure for `mark`
-- ----------------------------
DROP TABLE IF EXISTS `mark`;
CREATE TABLE `mark` (
  `mark_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `start_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `end_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`mark_id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `mark`
-- ----------------------------
BEGIN;
INSERT INTO `mark` VALUES ('1', '1', '2015-12-28 15:34:19', '2015-12-29 20:43:37', '2015-12-26 20:43:49', '2015-12-26 20:43:49'), ('2', '1', '2015-12-02 10:31:17', '2015-12-02 17:44:47', '2015-12-26 20:45:11', '2015-12-26 20:45:11'), ('3', '1', '2015-12-03 08:18:19', '2015-12-03 18:45:54', '2015-12-26 20:46:10', '2015-12-26 20:46:10');
COMMIT;

-- ----------------------------
--  Table structure for `setting`
-- ----------------------------
DROP TABLE IF EXISTS `setting`;
CREATE TABLE `setting` (
  `setting_id` int(11) NOT NULL AUTO_INCREMENT,
  `key` varchar(255) DEFAULT NULL,
  `value` varchar(255) DEFAULT NULL,
  `updatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`setting_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `number` varchar(255) DEFAULT NULL,
  `avator_img` varchar(255) DEFAULT NULL,
  `name` varchar(20) DEFAULT NULL,
  `pwd` varchar(255) DEFAULT NULL,
  `gender` varchar(2) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `depart_id` int(11) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `age` varchar(255) DEFAULT NULL,
  `enter_time` varchar(255) DEFAULT NULL,
  `role` varchar(255) DEFAULT NULL,
  `updatetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `user`
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('1', '1', 'idsHvb1PMHG80Mq', '大哥', '1', '男', '18722880916', '1', '359608925@qq.com', '20', '10', 'normal_user,statistic_user', '2015-12-28 23:18:15', '2015-12-17 13:12:58'), ('2', '2', null, '二哥', '2', '男', '1822222222', '2', '222@qq.com', '22', '2', 'depart_master', '2015-12-26 20:40:16', '2015-12-17 19:54:31'), ('3', '3', null, '三大爷', '3', '男', '1725368521', null, 'catold110@tju.edu.cn', '52', '31', 'deputy_manager', '2015-12-29 02:54:44', '2015-12-25 23:30:06'), ('4', '4', null, '四大爷', '4', '女', '18722550999', null, 'test@qq.com', '56', '33', 'general_manager', '2015-12-29 02:54:42', '2015-12-27 02:17:32');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
